import ReactDOM from "react-dom";
import React from "react";
import { Provider } from "react-redux";

import configureStore from "../store/configureStore";

import Routes from "../routes/";

import wpo from '@ali/retcodelog';
import rlog from "../utils/rlog";
// import ddPack from "@ali/ding-ddpack";
window._rlog = rlog;
wpo.setConfig({
	//抽样分母，1代表100%上报，10代表10%上报，100代表1%上报
	sample: 1,
	// spmId必须设置,如果没写默认值,会自动抓页面的spm
	spmId: 'app.-24',
	// weex容器内上报必须配置
	request: '',
	// 取nick name需要用到cookie
	cookie: ''
});
rlog("_index");

// ddPack(dd);

const store = configureStore();

/**
 * <Route path="introduce/:id" component={IntroduceCtl}/>   :id为参数，必选；introduce/(:id)可选参数
 * IndexRedirect 如果直接访问/直接跳转到default路由
 */

/**
 * dingdevtool  老是报错
 * 注释掉！
 * <DingDevTool url={url} room="debug"/>
 */
ReactDOM.render(
  <Provider store={store}>
    <Routes />
  </Provider>,
  document.getElementById("dingapp")
);

